#!/usr/bin/env node
//可读推送流-占内存大
const {Readable} = require('stream');
const rs = new Readable();
const fs = require('fs');

rs.push('hello');
rs.push('world');
rs.push(null);
//rs.pipe(process.stdout);
rs.pipe(fs.createWriteStream('./test.txt'));

